package com.boot.main.mapper;

import com.boot.main.entity.ScomOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ScomOrderMapper {
    List<ScomOrder> getOrders(@Param("currentSize") Integer currentSize, @Param("limit") Integer limit, @Param("user_id") Long user_id, @Param("status") Integer status);
    List<ScomOrder> getShopOrders(@Param("currentSize") Integer currentSize, @Param("limit") Integer limit, @Param("shop_id") Long shop_id, @Param("status") Integer status);
    Long getOrderIdByOrderSn(String order_sn);
    Integer getTotalCount(@Param("user_id") Long user_id, @Param("status") Integer status);
    Integer getTotalShopCount(@Param("shop_id") Long shop_id, @Param("status") Integer status);
    Integer saveOrder(ScomOrder order);
    Integer changeOrderStatus(@Param("status") Integer status,@Param("id") Long id);
    Integer changeOrderPostno(@Param("post_no") String post_no,@Param("id") Long id);
    Integer refundOrder(@Param("refund_type") Integer refund_type, @Param("refund_remark") String refund_remark, @Param("refund_time") Long refund_time, @Param("id") Long id);
    Integer deleteOrder(@Param("id") Long id, @Param("del") Integer del);
}
